<template>
  <div class="manager">
    <div class="container pt-4">
      <div class="row">
        <div class="col-12">
          <div class="pointsRule">
            <ul id="list">
              <li style="z-index:6;background-image: linear-gradient(to right, #005bea ,#00c6fb)" class="green" @click="gotoHome()"><a><span>首页</span><i style="background-color:#00c6fb"></i></a></li>
              <li style="z-index:5;background-image: linear-gradient(to right, #005bea ,#00c6fb)"  @click="gotoNav()"><a><em class="before"></em><span>预算管理</span><i style="background-color:#00c6fb"></i></a></li>
              <li style="z-index:4;background-color:#ffc107;"><a><em class="before"></em><span  style="color: #4e555b;">收入</span><i style="background-color:#ffc107;"></i></a></li>
            </ul>
          </div>
        </div>
      </div>
    </div>
    <div class="managerCon">
      <div class="container">
        <div class="row justify-content-center">
          <h2 class="text-primary">收入驾驶舱</h2>
        </div>
        <div class="content">
          <ul class="pl-0 row ">
            <li class="col-3">
              <div class="row justify-content-center">
                <div class="title">目标值</div>
              </div>
              <div class="num">{{fixNum(targetAmount)}}万</div>
            </li>
            <li class="col-3">
              <div class="row justify-content-center">
                <div class="title">预测值</div>
              </div>
              <div v-bind:class="['num ', predictAmount>=targetAmount ? 'text-success' : 'text-danger']"> {{fixNum(predictAmount)}}万</div>
            </li>
            <li class="col-3">
              <div class="row justify-content-center">
                <div class="title">实际值</div>
              </div>
              <div class="num">{{fixNum(sumAmount)}}万</div>
            </li>
            <li class="col-3">
              <div class="row justify-content-center">
                <div class="title">当月</div>
              </div>
              <div class="num">{{fixNum(nowMonthAmount)}}万</div>
            </li>
          </ul>
        </div>
      </div>
    </div>
    <div class="managerCon2 mt-3">
      <div class="container">
        <div class="row">
          <div class="col-12">
            <div class="content">
              <ul class="pl-0 row" v-if="orgid == 1">
                <li class="col-3" @click="gotoProfitDetails('早餐收入', 111)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>早餐收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <!--<div class="font-weight-normal">目标值：88.22%</div>-->
                    <!--<div class="font-weight-normal">预测值：88.22%</div>-->
                    <!--<div >实际值：<span class="text-success">89.90%</span></div>-->
                    <!--<div class="font-weight-normal">当月值：88.22%</div>-->
                    <table class="table">
                      <tbody>
                      <tr style="font-weight: bold; font-size: 16px">
                        <td>目标</td>
                        <td>预测</td>
                        <td>实际</td>
                        <td>当月</td>
                      </tr>
                      <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 1">
                        <td>{{fixNum(item.targetAmount)}}万</td>
                        <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                        <td>{{fixNum(item.sumAmount)}}万</td>
                        <td>{{fixNum(item.nowMonthAmount)}}万</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
                <li class="col-3" @click="gotoProfitDetails('午餐收入', 112)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>午餐收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <table class="table">
                      <tbody>
                      <tr style="font-weight: bold; font-size: 16px">
                        <td>目标</td>
                        <td>预测</td>
                        <td>实际</td>
                        <td>当月</td>
                      </tr>
                      <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 2">
                        <td>{{fixNum(item.targetAmount)}}万</td>
                        <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                        <td>{{fixNum(item.sumAmount)}}万</td>
                        <td>{{fixNum(item.nowMonthAmount)}}万</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
                <li class="col-3" @click="gotoProfitDetails('晚餐收入', 113)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>晚餐收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <!--<div class="font-weight-normal">目标值：88.22%</div>-->
                    <!--<div class="font-weight-normal">预测值：88.22%</div>-->
                    <!--<div >实际值：<span class="text-success">89.90%</span></div>-->
                    <!--<div class="font-weight-normal">当月值：88.22%</div>-->
                    <table class="table">
                      <tbody>
                      <tr style="font-weight: bold; font-size: 16px">
                        <td>目标</td>
                        <td>预测</td>
                        <td>实际</td>
                        <td>当月</td>
                      </tr>
                      <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 3">
                        <td>{{fixNum(item.targetAmount)}}万</td>
                        <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                        <td>{{fixNum(item.sumAmount)}}万</td>
                        <td>{{fixNum(item.nowMonthAmount)}}万</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
                <li class="col-3" @click="gotoProfitDetails('职场生活', 116)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>职场生活收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <!--<div class="font-weight-normal">目标值：88.22%</div>-->
                    <!--<div class="font-weight-normal">预测值：88.22%</div>-->
                    <!--<div >实际值：<span class="text-success">89.90%</span></div>-->
                    <!--<div class="font-weight-normal">当月值：88.22%</div>-->
                    <table class="table">
                      <tbody>
                        <tr style="font-weight: bold; font-size: 16px">
                          <td>目标</td>
                          <td>预测</td>
                          <td>实际</td>
                          <td>当月</td>
                        </tr>
                        <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 1">
                          <td>{{fixNum(item.targetAmount)}}万</td>
                          <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                          <td>{{fixNum(item.sumAmount)}}万</td>
                          <td>{{fixNum(item.nowMonthAmount)}}万</td>
                        </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
                <li class="col-3" @click="gotoProfitDetails('外部客户收入', 114)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>外部客户收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <table class="table">
                      <tbody>
                      <tr style="font-weight: bold; font-size: 16px">
                        <td>目标</td>
                        <td>预测</td>
                        <td>实际</td>
                        <td>当月</td>
                      </tr>
                      <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 4">
                        <td>{{fixNum(item.targetAmount)}}万</td>
                        <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                        <td>{{fixNum(item.sumAmount)}}万</td>
                        <td>{{fixNum(item.nowMonthAmount)}}万</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
                <li class="col-3" @click="gotoProfitDetails('外卖收入', 115)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>外卖收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <table class="table">
                      <tbody>
                      <tr style="font-weight: bold; font-size: 16px">
                        <td>目标</td>
                        <td>预测</td>
                        <td>实际</td>
                        <td>当月</td>
                      </tr>
                      <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 5">
                        <td>{{fixNum(item.targetAmount)}}万</td>
                        <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                        <td>{{fixNum(item.sumAmount)}}万</td>
                        <td>{{fixNum(item.nowMonthAmount)}}万</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
              </ul>
              <ul class="pl-0 row" v-if="orgid == 2">
                <li class="col-3" @click="gotoProfitDetails('早餐收入', 121)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>早餐收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <!--<div class="font-weight-normal">目标值：88.22%</div>-->
                    <!--<div class="font-weight-normal">预测值：88.22%</div>-->
                    <!--<div >实际值：<span class="text-success">89.90%</span></div>-->
                    <!--<div class="font-weight-normal">当月值：88.22%</div>-->
                    <table class="table">
                      <tbody>
                      <tr style="font-weight: bold; font-size: 16px">
                        <td>目标</td>
                        <td>预测</td>
                        <td>实际</td>
                        <td>当月</td>
                      </tr>
                      <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 1">
                        <td>{{fixNum(item.targetAmount)}}万</td>
                        <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                        <td>{{fixNum(item.sumAmount)}}万</td>
                        <td>{{fixNum(item.nowMonthAmount)}}万</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
                <li class="col-3" @click="gotoProfitDetails('午餐收入', 122)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>午餐收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <table class="table">
                      <tbody>
                      <tr style="font-weight: bold; font-size: 16px">
                        <td>目标</td>
                        <td>预测</td>
                        <td>实际</td>
                        <td>当月</td>
                      </tr>
                      <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 2">
                        <td>{{fixNum(item.targetAmount)}}万</td>
                        <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                        <td>{{fixNum(item.sumAmount)}}万</td>
                        <td>{{fixNum(item.nowMonthAmount)}}万</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
                <li class="col-3" @click="gotoProfitDetails('晚餐收入', 123)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>晚餐收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <!--<div class="font-weight-normal">目标值：88.22%</div>-->
                    <!--<div class="font-weight-normal">预测值：88.22%</div>-->
                    <!--<div >实际值：<span class="text-success">89.90%</span></div>-->
                    <!--<div class="font-weight-normal">当月值：88.22%</div>-->
                    <table class="table">
                      <tbody>
                      <tr style="font-weight: bold; font-size: 16px">
                        <td>目标</td>
                        <td>预测</td>
                        <td>实际</td>
                        <td>当月</td>
                      </tr>
                      <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 3">
                        <td>{{fixNum(item.targetAmount)}}万</td>
                        <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                        <td>{{fixNum(item.sumAmount)}}万</td>
                        <td>{{fixNum(item.nowMonthAmount)}}万</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
                <li class="col-3" @click="gotoProfitDetails('职场生活收入', 124)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>职场生活收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <table class="table">
                      <tbody>
                      <tr style="font-weight: bold; font-size: 16px">
                        <td>目标</td>
                        <td>预测</td>
                        <td>实际</td>
                        <td>当月</td>
                      </tr>
                      <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 4">
                        <td>{{fixNum(item.targetAmount)}}万</td>
                        <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                        <td>{{fixNum(item.sumAmount)}}万</td>
                        <td>{{fixNum(item.nowMonthAmount)}}万</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
              </ul>
              <ul class="pl-0 row" v-if="orgid == 3">
                <li class="col-3" @click="gotoProfitDetails('早餐收入', 131)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>早餐收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <!--<div class="font-weight-normal">目标值：88.22%</div>-->
                    <!--<div class="font-weight-normal">预测值：88.22%</div>-->
                    <!--<div >实际值：<span class="text-success">89.90%</span></div>-->
                    <!--<div class="font-weight-normal">当月值：88.22%</div>-->
                    <table class="table">
                      <tbody>
                      <tr style="font-weight: bold; font-size: 16px">
                        <td>目标</td>
                        <td>预测</td>
                        <td>实际</td>
                        <td>当月</td>
                      </tr>
                      <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 1">
                        <td>{{fixNum(item.targetAmount)}}万</td>
                        <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                        <td>{{fixNum(item.sumAmount)}}万</td>
                        <td>{{fixNum(item.nowMonthAmount)}}万</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
                <li class="col-3" @click="gotoProfitDetails('食堂收入', 132)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>食堂收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <table class="table">
                      <tbody>
                      <tr style="font-weight: bold; font-size: 16px">
                        <td>目标</td>
                        <td>预测</td>
                        <td>实际</td>
                        <td>当月</td>
                      </tr>
                      <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 2">
                        <td>{{fixNum(item.targetAmount)}}万</td>
                        <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                        <td>{{fixNum(item.sumAmount)}}万</td>
                        <td>{{fixNum(item.nowMonthAmount)}}万</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
                <li class="col-3" @click="gotoProfitDetails('套餐收入', 133)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>套餐收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <!--<div class="font-weight-normal">目标值：88.22%</div>-->
                    <!--<div class="font-weight-normal">预测值：88.22%</div>-->
                    <!--<div >实际值：<span class="text-success">89.90%</span></div>-->
                    <!--<div class="font-weight-normal">当月值：88.22%</div>-->
                    <table class="table">
                      <tbody>
                      <tr style="font-weight: bold; font-size: 16px">
                        <td>目标</td>
                        <td>预测</td>
                        <td>实际</td>
                        <td>当月</td>
                      </tr>
                      <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 3">
                        <td>{{fixNum(item.targetAmount)}}万</td>
                        <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                        <td>{{fixNum(item.sumAmount)}}万</td>
                        <td>{{fixNum(item.nowMonthAmount)}}万</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
                <li class="col-3" @click="gotoProfitDetails('点餐收入', 134)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>点餐收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <table class="table">
                      <tbody>
                      <tr style="font-weight: bold; font-size: 16px">
                        <td>目标</td>
                        <td>预测</td>
                        <td>实际</td>
                        <td>当月</td>
                      </tr>
                      <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 4">
                        <td>{{fixNum(item.targetAmount)}}万</td>
                        <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                        <td>{{fixNum(item.sumAmount)}}万</td>
                        <td>{{fixNum(item.nowMonthAmount)}}万</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
                <li class="col-3" @click="gotoProfitDetails('外卖收入', 135)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>外卖收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <table class="table">
                      <tbody>
                      <tr style="font-weight: bold; font-size: 16px">
                        <td>目标</td>
                        <td>预测</td>
                        <td>实际</td>
                        <td>当月</td>
                      </tr>
                      <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 4">
                        <td>{{fixNum(item.targetAmount)}}万</td>
                        <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                        <td>{{fixNum(item.sumAmount)}}万</td>
                        <td>{{fixNum(item.nowMonthAmount)}}万</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
                <li class="col-3" @click="gotoProfitDetails('农产品加工收入', 136)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>农产品加工收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <table class="table">
                      <tbody>
                      <tr style="font-weight: bold; font-size: 16px">
                        <td>目标</td>
                        <td>预测</td>
                        <td>实际</td>
                        <td>当月</td>
                      </tr>
                      <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 4">
                        <td>{{fixNum(item.targetAmount)}}万</td>
                        <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                        <td>{{fixNum(item.sumAmount)}}万</td>
                        <td>{{fixNum(item.nowMonthAmount)}}万</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
              </ul>
              <ul class="pl-0 row" v-if="orgid == 4">
                <li class="col-3" @click="gotoProfitDetails('猪养殖收入', 141)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>猪养殖收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <!--<div class="font-weight-normal">目标值：88.22%</div>-->
                    <!--<div class="font-weight-normal">预测值：88.22%</div>-->
                    <!--<div >实际值：<span class="text-success">89.90%</span></div>-->
                    <!--<div class="font-weight-normal">当月值：88.22%</div>-->
                    <table class="table">
                      <tbody>
                      <tr style="font-weight: bold; font-size: 16px">
                        <td>目标</td>
                        <td>预测</td>
                        <td>实际</td>
                        <td>当月</td>
                      </tr>
                      <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 1">
                        <td>{{fixNum(item.targetAmount)}}万</td>
                        <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                        <td>{{fixNum(item.sumAmount)}}万</td>
                        <td>{{fixNum(item.nowMonthAmount)}}万</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
                <li class="col-3" @click="gotoProfitDetails('鸡养殖收入', 142)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>鸡养殖收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <table class="table">
                      <tbody>
                      <tr style="font-weight: bold; font-size: 16px">
                        <td>目标</td>
                        <td>预测</td>
                        <td>实际</td>
                        <td>当月</td>
                      </tr>
                      <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 2">
                        <td>{{fixNum(item.targetAmount)}}万</td>
                        <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                        <td>{{fixNum(item.sumAmount)}}万</td>
                        <td>{{fixNum(item.nowMonthAmount)}}万</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
                <li class="col-3" @click="gotoProfitDetails('鸡蛋收入', 143)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>鸡蛋收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <!--<div class="font-weight-normal">目标值：88.22%</div>-->
                    <!--<div class="font-weight-normal">预测值：88.22%</div>-->
                    <!--<div >实际值：<span class="text-success">89.90%</span></div>-->
                    <!--<div class="font-weight-normal">当月值：88.22%</div>-->
                    <table class="table">
                      <tbody>
                      <tr style="font-weight: bold; font-size: 16px">
                        <td>目标</td>
                        <td>预测</td>
                        <td>实际</td>
                        <td>当月</td>
                      </tr>
                      <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 3">
                        <td>{{fixNum(item.targetAmount)}}万</td>
                        <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                        <td>{{fixNum(item.sumAmount)}}万</td>
                        <td>{{fixNum(item.nowMonthAmount)}}万</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
                <li class="col-3" @click="gotoProfitDetails('鸭养殖收入', 144)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>鸭养殖收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <table class="table">
                      <tbody>
                      <tr style="font-weight: bold; font-size: 16px">
                        <td>目标</td>
                        <td>预测</td>
                        <td>实际</td>
                        <td>当月</td>
                      </tr>
                      <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 4">
                        <td>{{fixNum(item.targetAmount)}}万</td>
                        <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                        <td>{{fixNum(item.sumAmount)}}万</td>
                        <td>{{fixNum(item.nowMonthAmount)}}万</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
                <li class="col-3" @click="gotoProfitDetails('羊养殖收入', 145)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>羊养殖收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <table class="table">
                      <tbody>
                      <tr style="font-weight: bold; font-size: 16px">
                        <td>目标</td>
                        <td>预测</td>
                        <td>实际</td>
                        <td>当月</td>
                      </tr>
                      <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 5">
                        <td>{{fixNum(item.targetAmount)}}万</td>
                        <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                        <td>{{fixNum(item.sumAmount)}}万</td>
                        <td>{{fixNum(item.nowMonthAmount)}}万</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
              </ul>
              <ul class="pl-0 row" v-if="orgid == 5">
                <li class="col-3" @click="gotoProfitDetails('谷物种植收入', 151)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>谷物种植收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <!--<div class="font-weight-normal">目标值：88.22%</div>-->
                    <!--<div class="font-weight-normal">预测值：88.22%</div>-->
                    <!--<div >实际值：<span class="text-success">89.90%</span></div>-->
                    <!--<div class="font-weight-normal">当月值：88.22%</div>-->
                    <table class="table">
                      <tbody>
                      <tr style="font-weight: bold; font-size: 16px">
                        <td>目标</td>
                        <td>预测</td>
                        <td>实际</td>
                        <td>当月</td>
                      </tr>
                      <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 1">
                        <td>{{fixNum(item.targetAmount)}}万</td>
                        <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                        <td>{{fixNum(item.sumAmount)}}万</td>
                        <td>{{fixNum(item.nowMonthAmount)}}万</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
                <li class="col-3" @click="gotoProfitDetails('豆类、油类和薯类种植收入', 152)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>豆类、油类和薯类种植收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <table class="table">
                      <tbody>
                      <tr style="font-weight: bold; font-size: 16px">
                        <td>目标</td>
                        <td>预测</td>
                        <td>实际</td>
                        <td>当月</td>
                      </tr>
                      <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 2">
                        <td>{{fixNum(item.targetAmount)}}万</td>
                        <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                        <td>{{fixNum(item.sumAmount)}}万</td>
                        <td>{{fixNum(item.nowMonthAmount)}}万</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
                <li class="col-3" @click="gotoProfitDetails('蔬菜种植收入', 153)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>蔬菜种植收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <!--<div class="font-weight-normal">目标值：88.22%</div>-->
                    <!--<div class="font-weight-normal">预测值：88.22%</div>-->
                    <!--<div >实际值：<span class="text-success">89.90%</span></div>-->
                    <!--<div class="font-weight-normal">当月值：88.22%</div>-->
                    <table class="table">
                      <tbody>
                      <tr style="font-weight: bold; font-size: 16px">
                        <td>目标</td>
                        <td>预测</td>
                        <td>实际</td>
                        <td>当月</td>
                      </tr>
                      <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 3">
                        <td>{{fixNum(item.targetAmount)}}万</td>
                        <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                        <td>{{fixNum(item.sumAmount)}}万</td>
                        <td>{{fixNum(item.nowMonthAmount)}}万</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
              </ul>
              <ul class="pl-0 row" v-if="orgid == 6">
                <li class="col-3" @click="gotoProfitDetails('住宿收入', 161)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>住宿收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <!--<div class="font-weight-normal">目标值：88.22%</div>-->
                    <!--<div class="font-weight-normal">预测值：88.22%</div>-->
                    <!--<div >实际值：<span class="text-success">89.90%</span></div>-->
                    <!--<div class="font-weight-normal">当月值：88.22%</div>-->
                    <table class="table">
                      <tbody>
                      <tr style="font-weight: bold; font-size: 16px">
                        <td>目标</td>
                        <td>预测</td>
                        <td>实际</td>
                        <td>当月</td>
                      </tr>
                      <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 1">
                        <td>{{fixNum(item.targetAmount)}}万</td>
                        <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                        <td>{{fixNum(item.sumAmount)}}万</td>
                        <td>{{fixNum(item.nowMonthAmount)}}万</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
                <li class="col-3" @click="gotoProfitDetails('餐饮收入', 162)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>餐饮收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <table class="table">
                      <tbody>
                      <tr style="font-weight: bold; font-size: 16px">
                        <td>目标</td>
                        <td>预测</td>
                        <td>实际</td>
                        <td>当月</td>
                      </tr>
                      <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 2">
                        <td>{{fixNum(item.targetAmount)}}万</td>
                        <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                        <td>{{fixNum(item.sumAmount)}}万</td>
                        <td>{{fixNum(item.nowMonthAmount)}}万</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
                <li class="col-3" @click="gotoProfitDetails('加工产品收入', 163)">
                  <div class="row justify-content-center">
                    <div class="title">
                      <span>加工产品收入</span>
                    </div>
                  </div>
                  <div class="num">
                    <!--<div class="font-weight-normal">目标值：88.22%</div>-->
                    <!--<div class="font-weight-normal">预测值：88.22%</div>-->
                    <!--<div >实际值：<span class="text-success">89.90%</span></div>-->
                    <!--<div class="font-weight-normal">当月值：88.22%</div>-->
                    <table class="table">
                      <tbody>
                      <tr style="font-weight: bold; font-size: 16px">
                        <td>目标</td>
                        <td>预测</td>
                        <td>实际</td>
                        <td>当月</td>
                      </tr>
                      <tr style="font-size: 15px; color: #5a6268; font-weight: bold" v-for="item in detailList" v-if="item.type == 1 + orgid + 3">
                        <td>{{fixNum(item.targetAmount)}}万</td>
                        <td v-bind:class="item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month) < item.targetAmount ? 'text-danger': 'text-success'">{{fixNum(item.sumAmount - item.nowMonthAmount + (item.lastMonthAmount*month))}}万</td>
                        <td>{{fixNum(item.sumAmount)}}万</td>
                        <td>{{fixNum(item.nowMonthAmount)}}万</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </li>
              </ul>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: "profit",
    data(){
      return{
        isShow: true,
        isShow1:true,
        sumAmount: 0,
        nowMonthAmount: 0,
        targetAmount: 0,
        predictAmount: 0,
        detailList: [],
        incomeList: [],
        nowMonthSum1: 0,
        budgetAmount1: 0,
        nowMonthSum2: 0,
        budgetAmount2: 0,
        month: 12,
        service: {
          actualAmount: 0,
          nowMonthIncome: 0
        },
        lastMonthAmount: 0,
        loading: {},
        orgid: window.sessionStorage.getItem('orgid'),
        type: 1,
        typeList: []
      }
    },
    created() {
      this.month = 12 - new Date().getMonth()
      this.type = 1 + this.orgid
      this.getIncomeList()
    },
    methods:{
      //跳转到首页
      gotoHome: function(){
        this.$router.push("/index")
        this.isActive=0
      },
      //跳转到书吧n'p'm
      gotoNav: function(){
        this.$router.push("/nav2");
      },
      gotoProfitDetails(project, proType){
        window.sessionStorage.setItem('project', project)
        window.sessionStorage.setItem('proType', proType)
        this.$router.push("/profitDetails")
      },
      getIncomeList(){
        // this.loading = this.$loading({
        //   lock: true,//lock的修改符--默认是false
        //   text: 'Loading',//显示在加载图标下方的加载文案
        //   spinner: 'el-icon-loading',//自定义加载图标类名
        //   background: 'rgba(0, 0, 0, 0.7)',//遮罩层颜色
        //   target: document.querySelector('#table')//loadin覆盖的dom元素节点
        // });
        this.$http.get(
          '/api/getCostSum',
          {
            params: {
              type: this.type
            }
          }).then(res => {
          this.sumAmount = res.data.sumAmount
          this.nowMonthAmount = res.data.nowMonthAmount
          this.targetAmount = res.data.targetAmount
          this.lastMonthAmount = res.data.lastMonthAmount
          this.predictAmount = this.sumAmount - this.nowMonthAmount + (this.lastMonthAmount * this.month)
          this.detailList = res.data.list
          // this.loading.close()
        })
      },
      fixNum (num) {
        return (num/10000).toFixed(2)
      },
    },
  }
</script>

<style scoped>
  .breadcrumb{
    padding: 10px 5px;
    padding-bottom: 5px;
    background: white;
  }
  .breadcrumb-item a,
  .breadcrumb-item{
    font-size: 20px;
  }
  .manager{
    height: 130%;
  }

  .managerCon h2{
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 3px;
    position: relative;
    top: 20px;
    background: white;
    padding: 0 10px;
  }
  .managerCon2 h2{
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 3px;
  }
  .managerCon .content{
    /*background: url("~@/assets/img/bg1.jpg") no-repeat;*/
    background-size: 100% 100%;
    padding-top: 35px;
    padding-bottom: 35px;
  }
  .managerCon .content ul li{
    list-style: none;
    text-align: center;
    padding: 0 60px;
  }
  .managerCon2 .content ul li{
    list-style: none;
    text-align: center;
    padding: 0 10px;
  }
  .managerCon .content ul li .title{
    z-index: 999;
    background: white;
    font-size: 20px;
    color: #95999c;
    position: relative;
    top: 17px;
    letter-spacing: 2px;
    padding: 0 5px;
  }
  .managerCon2 .content ul li .title{
    z-index: 999;
    background: white;
    font-size: 18px;
    color: #95999c;
    position: relative;
    top: 17px;
    padding: 0 10px;
    cursor: pointer;
  }
  .managerCon .content ul li .num{
    font-size: 26px;
    letter-spacing: 2px;
    font-weight: bold;
    border: 3px solid #7abaff;
    border-radius: 10px;
    padding: 30px 10px;

  }
  .managerCon2 .content ul li .num{
    border: 3px solid #7abaff;
    /*padding: 5px;*/
    border-radius: 10px;
  }
  .managerCon2 .content ul li .num table{
    margin-bottom: 0;
    cursor: pointer;
  }
  .managerCon2 .content ul li .num table tr td{
    border-top: none;
  }
  .managerCon2 .content ul li .num table tr:last-child td:not(:last-child){
    border-right: 2px solid #cbd3da;
  }
  .managerCon2 .content ul li .num .tableList tr:nth-child(n+5){
    display: none;
  }
  .checkMore{
    text-align: right;
    font-size: 14px;
    color: #adb5bd;
    margin-bottom: 10px;
  }


</style>
